<template>
  <div>
    <el-col
      v-for="btn in btnGroups"
      :key="btn.name"
      :span="8"
      class="table-button"
    >
      <el-button
        v-if="btn.location == 'table'"
        :type="'text'"
        size="mini"
        @click="btn.method(row) || defaultBtnMethod(row)"
      >
        {{ btn.name }}
      </el-button>
    </el-col>
  </div>
</template>

<script>
export default {
    //业务类型的按钮 根据单据状态进行判断
    props:["row"],  
  data() {
    return {
      btnGroups: [],
    };
  },
  mounted() {
    //this.btnGroups=this.$store.state.button.currentMenuButton
    this.btnGroups = this.$store.state.button.currentMenuButton.filter((e) => {
      return e.location == "table";
    });
  },
};
</script>

<style>
</style>